package com
{
	import com.DataAndConstant.GameData;
	
	import flash.display.Sprite;

	public class WardrobeItemsFinder
	{
		private static var instanceGet:WardrobeItemsFinder;
		
		public static function getInstance():WardrobeItemsFinder
		{
			if(instanceGet == null)
			{
				instanceGet = new WardrobeItemsFinder();
			}
			return instanceGet;
		}
		
		public function itemFinder(str:String):Sprite
		{
			var sprite:Sprite = new Sprite();
			if(GameData.getInstance().isGirlSelected)
			{
				switch(str)
				{
					case "Jeans":
					{
						var custom1:Lower_1 = new Lower_1();
						sprite.addChild(custom1);
						break;
					}
					case "T-shirt":
					{
						var custom2:GTshirt0 = new GTshirt0();
						sprite.addChild(custom2);
						break;
					}
					case "Jacket":
					{
						var custom3:jacket1 = new jacket1();
						sprite.addChild(custom3);
						break;
					}
					case "Shoes":
					{
						var custom4:gShoes1 = new gShoes1();
						sprite.addChild(custom4);
						break;
					}
					case "Belt":
					{
						var custom5:Belt = new Belt();
						sprite.addChild(custom5);
						break;
					}
					case "Locket":
					{
						var custom6:Neck0 = new Neck0();
						sprite.addChild(custom6);
						break;
					}
					case "WristBand":
					{
						var custom7:Band0 = new Band0();
						sprite.addChild(custom7);
						break;
					}
					case "Hair":
					{
						var custom9:Hair0 = new Hair0();
						sprite.addChild(custom9);
						break;
					}
					case "Caps":
					{
						var custom8:Hat0 = new Hat0();
						sprite.addChild(custom8);
						break;
					}	
					default:
					{
						break;
					}
				}
			}
			else
			{
				switch(str)
				{
					case "Jeans":
					{
						var custom_1:paint1 = new paint1();
						sprite.addChild(custom_1);
						break;
					}
					case "T-shirt":
					{
						var custom_2:tshirt1 = new tshirt1();
						sprite.addChild(custom_2);
						break;
					}
					case "Jacket":
					{
						var custom_3:boyJacket1 = new boyJacket1();
						sprite.addChild(custom_3);
						break;
					}
					case "Shoes":
					{
						var custom_4:bShoes0 = new bShoes0();
						sprite.addChild(custom_4);
						break;
					}
					case "Belt":
					{
						var custom_5:bBelt0 = new bBelt0();
						sprite.addChild(custom_5);
						break;
					}
					case "Locket":
					{
						var custom_6:Neck0 = new Neck0();
						sprite.addChild(custom_6);
						break;
					}
					case "WristBand":
					{
						var custom_7:bBand0 = new bBand0();
						sprite.addChild(custom_7);
						break;
					}
					case "Hair":
					{
						var custom_8:bHair0 = new bHair0();
						sprite.addChild(custom_8);
						break;
					}
					case "Caps":
					{
						var custom_9:bHat0 = new bHat0();
						sprite.addChild(custom_9);
						break;
					}	
					default:
					{
						break;
					}
				}
			}
			
			return sprite;
		}
		public function wardrobeListItemFinder(str:String):Sprite
		{
			var keyFinder:String = str.slice(0,str.length-1)
			var sprite:Sprite = new Sprite();
			if(GameData.getInstance().isGirlSelected)
			{
				switch(keyFinder)
				{
					case "Blan":
					{
						var blank:Blank= new Blank();
						return blank;
						break;
					}
					case "girlJacket":
					{
						sprite.addChild(girlJacketFinder(str));
						break;
					}
					case "Jeans":
					{
						sprite.addChild(girlLowerFinder(str));
						break;
					}
					case "T-shirt":
					{
						sprite.addChild(girlTshirtFinder(str));
						break;
					}
					case "shoes":
					{
						sprite.addChild(girlShoesFinder(str));
						break;
					}
					case "Belt":
					{
						sprite.addChild(girlBeltFinder(str));
						break;
					}
					case "Locket":
					{
						sprite.addChild(girlLocketFinder(str));
						break;
					}
					case "WB":
					{
						sprite.addChild(girlWristbandFinder(str));
						break;
					}
					case "Hair":
					{
						sprite.addChild(girlHairFinder(str));
						break;
					}
					case "caps":
					{
						sprite.addChild(girlCapsFinder(str));
						break;
					}
				}
			}
			else
			{
				switch(keyFinder)
				{
					case "Blan":
					{
						var blank:Blank= new Blank();
						return blank;
						break;
					}
					case "boyJacket":
					{
						sprite.addChild(boyJacketFinder(str));
						break;
					}
					case "Jeans":
					{
						sprite.addChild(boyLowerFinder(str));
						break;
					}
					case "T-shirt":
					{
						sprite.addChild(boyTshirtFinder(str));
						break;
					}
					case "shoes":
					{
						sprite.addChild(boyShoesFinder(str));
						break;
					}
					case "Belt":
					{
						sprite.addChild(boyBeltFinder(str));
						break;
					}
					case "Locket":
					{
						sprite.addChild(boyLocketFinder(str));
						break;
					}
					case "WB":
					{
						sprite.addChild(boyWristbandFinder(str));
						break;
					}
					case "Hair":
					{
						sprite.addChild(boyHairFinder(str));
						break;
					}
					case "caps":
					{
						sprite.addChild(boyCapsFinder(str));
						break;
					}
				}
			}
			return sprite;
		}
		private function boyJacketFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "boyJacket1":
				{
					var boyjacket1:boyJacket1 = new boyJacket1();
					return boyjacket1;
					break;
				}
				case "boyJacket2":
				{
					var boyjacket2:boyJacket2 = new boyJacket2();
					return boyjacket2;
					break;
				}	
				case "boyJacket3":
				{
					var boyjacket3:boyJacket3 = new boyJacket3();
					return boyjacket3;
					break;
				}
				case "boyJacket4":
				{
					var boyjacket4:boyJacket4 = new boyJacket4();
					return boyjacket4;
					break;
				}
				case "boyJacket5":
				{
					var boyjacket5:boyJacket5 = new boyJacket5();
					return boyjacket5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyLowerFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Jeans1":
				{
					var lower1:paint1 = new paint1();
					return lower1;
					break;
				}
				case "Jeans2":
				{
					var lower2:paint2 = new paint2();
					return lower2;
					break;
				}	
				case "Jeans3":
				{
					var lower3:paint3 = new paint3();
					return lower3;
					break;
				}
				case "Jeans4":
				{
					var lower4:paint4 = new paint4();
					return lower4;
					break;
				}
				case "Jeans5":
				{
					var lower5:paint5 = new paint5();
					return lower5;
					break;
				}
				case "Jeans6":
				{
					var lower6:paint6 = new paint6();
					return lower6;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyTshirtFinder(str:String):Sprite
		{
			switch(str)
			{
				case "T-shirt1":
				{
					var Tshirt1:tshirt1 = new tshirt1();
					return Tshirt1;
					break;
				}
				case "T-shirt2":
				{
					var Tshirt2:tshirt2 = new tshirt2();
					return Tshirt2;
					break;
				}	
				case "T-shirt3":
				{
					var Tshirt3:tshirt3 = new tshirt3();
					return Tshirt3;
					break;
				}
				case "T-shirt4":
				{
					var Tshirt4:tshirt4 = new tshirt4();
					return Tshirt4;
					break;
				}
				case "T-shirt5":
				{
					var Tshirt5:tshirt5 = new tshirt5();
					return Tshirt5;
					break;
				}
				case "T-shirt6":
				{
					var Tshirt6:tshirt6 = new tshirt6();
					return Tshirt6;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyShoesFinder(str:String):Sprite
		{
			switch(str)
			{
				case "shoes1":
				{
					var shoes:bShoes0 = new bShoes0();
					return shoes;
					break;
				}
				case "shoes2":
				{
					var boyjacket2:bShoes1 = new bShoes1();
					return boyjacket2;
					break;
				}	
				case "shoes3":
				{
					var boyjacket3:bShoes2 = new bShoes2();
					return boyjacket3;
					break;
				}
				case "shoes4":
				{
					var boyjacket4:bShoes3 = new bShoes3();
					return boyjacket4;
					break;
				}
				case "shoes5":
				{
					var boyjacket5:bShoes4 = new bShoes4();
					return boyjacket5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyBeltFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "Belt1":
				{
					var shoes1:bBelt0 = new bBelt0();
					return shoes1;
					break;
				}
				case "Belt2":
				{
					var shoes2:bBelt1 = new bBelt1();
					return shoes2;
					break;
				}	
				case "Belt3":
				{
					var shoes3:bBelt2 = new bBelt2();
					return shoes3;
					break;
				}
				case "Belt4":
				{
					var shoes4:bBelt3 = new bBelt3();
					return shoes4;
					break;
				}
				case "Belt5":
				{
					var shoes5:bBelt4 = new bBelt4();
					return shoes5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyLocketFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "Locket1":
				{
					var Locket1:Neck0 = new Neck0();
					return Locket1;
					break;
				}
				case "Locket2":
				{
					var Locket2:Neck1 = new Neck1();
					return Locket2;
					break;
				}	
				case "Locket3":
				{
					var Locket3:Neck2 = new Neck2();
					return Locket3;
					break;
				}
				case "Locket4":
				{
					var Locket4:Neck3 = new Neck3();
					return Locket4;
					break;
				}
				case "Locket5":
				{
					var Locket5:Neck4 = new Neck4();
					return Locket5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyWristbandFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "WB1":
				{
					var wb1:bBand0 = new bBand0();
					return wb1;
					break;
				}
				case "WB2":
				{
					var wb2:bBand1 = new bBand1();
					return wb2;
					break;
				}	
				case "WB3":
				{
					var wb3:bBand2 = new bBand2();
					return wb3;
					break;
				}
				case "WB4":
				{
					var wb4:bBand3 = new bBand3();
					return wb4;
					break;
				}
				case "WB5":
				{
					var wb5:bBand4 = new bBand4();
					return wb5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyHairFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Hair1":
				{
					var hair1:bHair0 = new bHair0();
					return hair1;
					break;
				}
				case "Hair2":
				{
					var hair2:bHair1 = new bHair1();
					return hair2;
					break;
				}	
				case "Hair3":
				{
					var hair3:bHair2 = new bHair2();
					return hair3;
					break;
				}
				case "Hair4":
				{
					var hair4:bHair4 = new bHair4();
					return hair4;
					break;
				}
				case "Hair5":
				{
					var hair5:bHair5 = new bHair5();
					return hair5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function boyCapsFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "caps1":
				{
					var cap1:bHat0 = new bHat0();
					return cap1;
					break;
				}
				case "caps2":
				{
					var cap2:bHat1 = new bHat1();
					return cap2;
					break;
				}	
				case "caps3":
				{
					var cap3:bHat3 = new bHat3();
					return cap3;
					break;
				}
				case "caps4":
				{
					var cap4:bHat4 = new bHat4();
					return cap4;
					break;
				}
				case "caps5":
				{
					var cap5:bHat0 = new bHat0();
					return cap5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		
		
		//Girl Section
		
		private function girlJacketFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "girlJacket1":
				{
					var girljacket1:jacket1= new jacket1();
					return girljacket1;
					break;
				}
				case "girlJacket2":
				{
					var boyjacket2:jacket2 = new jacket2();
					return boyjacket2;
					break;
				}	
				case "girlJacket3":
				{
					var boyjacket3:jacket3 = new jacket3();
					return boyjacket3;
					break;
				}
				case "girlJacket4":
				{
					var boyjacket4:jacket4 = new jacket4();
					return boyjacket4;
					break;
				}
				case "girlJacket5":
				{
					var boyjacket5:jacket5 = new jacket5();
					return boyjacket5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlLowerFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Jeans1":
				{
					var boyjacket1:Lower_1 = new Lower_1();
					return boyjacket1;
					break;
				}
				case "Jeans2":
				{
					var boyjacket2:Lower_2 = new Lower_2();
					return boyjacket2;
					break;
				}	
				case "Jeans3":
				{
					var boyjacket3:Lower_3 = new Lower_3();
					return boyjacket3;
					break;
				}
				case "Jeans4":
				{
					var boyjacket4:Lower_4 = new Lower_4();
					return boyjacket4;
					break;
				}
				case "Jeans5":
				{
					var boyjacket5:Lower_5 = new Lower_5();
					return boyjacket5;
					break;
				}
				case "Jeans6":
				{
					var boyjacket6:Lower_6 = new Lower_6();
					return boyjacket6;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
			
		}
		private function girlTshirtFinder(str:String):Sprite
		{
			switch(str)
			{
				case "T-shirt1":
				{
					var Tshirt1:GTshirt0 = new GTshirt0();
					return Tshirt1;
					break;
				}
				case "T-shirt2":
				{
					var Tshirt2:GTshirt1 = new GTshirt1();
					return Tshirt2;
					break;
				}	
				case "T-shirt3":
				{
					var Tshirt3:GTshirt2 = new GTshirt2();
					return Tshirt3;
					break;
				}
				case "T-shirt4":
				{
					var Tshirt4:GTshirt3 = new GTshirt3();
					return Tshirt4;
					break;
				}
				case "T-shirt5":
				{
					var Tshirt5:GTshirt4 = new GTshirt4();
					return Tshirt5;
					break;
				}
				case "T-shirt6":
				{
					var Tshirt6:GTshirt5 = new GTshirt5();
					return Tshirt6;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlShoesFinder(str:String):Sprite
		{
			switch(str)
			{
				case "shoes1":
				{
					var shoes1:gShoes1 = new gShoes1();
					return shoes1;
					break;
				}
				case "shoes2":
				{
					var boyjacket2:gShoes10 = new gShoes10();
					return boyjacket2;
					break;
				}	
				case "shoes3":
				{
					var boyjacket3:gShoes11 = new gShoes11();
					return boyjacket3;
					break;
				}
				case "shoes4":
				{
					var boyjacket4:gShoes12 = new gShoes12();
					return boyjacket4;
					break;
				}
				case "shoes5":
				{
					var boyjacket6:gShoes13 = new gShoes13();
					return boyjacket6;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlBeltFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "Belt1":
				{
					var shoes1:Belt = new Belt();
					return shoes1;
					break;
				}
				case "Belt2":
				{
					var shoes2:Belt1 = new Belt1();
					return shoes2;
					break;
				}	
				case "Belt3":
				{
					var shoes3:Belt2 = new Belt2();
					return shoes3;
					break;
				}
				case "Belt4":
				{
					var shoes4:Belt3 = new Belt3();
					return shoes4;
					break;
				}
				case "Belt5":
				{
					var shoes5:Belt4 = new Belt4();
					return shoes5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlLocketFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "Locket1":
				{
					var boyjacket1:Neck0 = new Neck0();
					return boyjacket1;
					break;
				}
				case "Locket2":
				{
					var boyjacket2:Neck1 = new Neck1();
					return boyjacket2;
					break;
				}	
				case "Locket3":
				{
					var boyjacket3:Neck2 = new Neck2();
					return boyjacket3;
					break;
				}
				case "Locket4":
				{
					var boyjacket4:Neck3 = new Neck3();
					return boyjacket4;
					break;
				}
				case "Locket5":
				{
					var boyjacket5:Neck4 = new Neck4();
					return boyjacket5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlWristbandFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "WB1":
				{
					var WB1:bBand0 = new bBand0();
					return WB1;
					break;
				}
				case "WB2":
				{
					var WB2:bBand1 = new bBand1();
					return WB2;
					break;
				}	
				case "WB3":
				{
					var WB3:bBand2 = new bBand2();
					return WB3;
					break;
				}
				case "WB4":
				{
					var WB4:bBand3 = new bBand3();
					return WB4;
					break;
				}
				case "WB5":
				{
					var WB5:bBand4 = new bBand4();
					return WB5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlHairFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Hair1":
				{
					var hair1:Hair0 = new Hair0();
					return hair1;
					break;
				}
				case "Hair2":
				{
					var hair2:Hair1 = new Hair1();
					return hair2;
					break;
				}	
				case "Hair3":
				{
					var hair3:Hair2 = new Hair2();
					return hair3;
					break;
				}
				case "Hair4":
				{
					var hair4:Hair3 = new Hair3();
					return hair4;
					break;
				}
				case "Hair5":
				{
					var hair5:Hair4 = new Hair4();
					return hair5;
					break;
				}
				case "Hair6":
				{
					var hair6:Hair5 = new Hair5();
					return hair6;
					break;
				}
				case "Hair7":
				{
					var hair7:Hair6 = new Hair6();
					return hair7;
					break;
				}
				case "Hair8":
				{
					var hair8:Hair7 = new Hair7();
					return hair8;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		private function girlCapsFinder(str:String):Sprite
		{
			switch(str)
			{
				case "Blank":
				{
					var blank:Blank= new Blank();
					return blank;
					break;
				}
				case "caps1":
				{
					var boyjacket1:Hat0 = new Hat0();
					return boyjacket1;
					break;
				}
				case "caps2":
				{
					var boyjacket2:Hat1 = new Hat1();
					return boyjacket2;
					break;
				}	
				case "caps3":
				{
					var boyjacket3:Hat2 = new Hat2();
					return boyjacket3;
					break;
				}
				case "caps4":
				{
					var boyjacket4:Hat3 = new Hat3();
					return boyjacket4;
					break;
				}
				case "caps5":
				{
					var boyjacket5:Hat4 = new Hat4();
					return boyjacket5;
					break;
				}
				default:
				{
					break;
				}
			}
			return null;
		}
		public function WardrobeItemsFinder()
		{
			
		}
	}
}